﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="OrderDetailFilmOK.aspx.cs"
    Inherits="Manager_OrderDetail_OrderDetailFilmOK" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Chi tiet don dat hang</title>
    <link href="../../Pub/Css/AdminStyles.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
     try
    {
        window.onload=function()
        {
              var sState='<%=Request["sState"]%>';
              if(sState=='E' || sState=='S') // Ctrl + P
              {
                    var btnPrint=document.getElementById("imgPrint");
                    btnPrint.style.visibility="visible";
                    btnPrint.style.display="block";
              }
        }
    }
    catch(e){}
    </script>

</head>
<body style="padding-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px">
    <form id="form1" runat="server">
        <div>
            <table border="0" cellpadding="0" cellspacing="0" width="95%">
                <tr>
                    <td align="right">
                        <img src="../../Images/Icon/print.jpg" border="0" onclick="printPage()" style="cursor: pointer;
                            visibility: hidden; display: none" id="imgPrint" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <div id="printBody">
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <td style="padding-left: 95mm; padding-top: 15mm">
                                        <table border="0" bordercolor="#407db3" cellpadding="2" cellspacing="0" style="border-collapse: collapse"
                                            width="710mm">
                                            <tr>
                                                <td align="center" colspan="4">
                                                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                                                        <tr>
                                                            <td rowspan="5" style="width: 76px">
                                                                <img src="../../Images/Banner/logo.png" /></td>
                                                            <td align="left" style="padding-left: 4px" nowrap>
                                                                <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                                                                    <tr>
                                                                        <td>
                                                                            <asp:Label ID="Label11" runat="server" Text="Công ty TNHH Hoàng Nguyên Bảo" Style="font-family: Tahoma,Arial,Helvetica,sans-serif;
                                                                                font-size: 12px;"></asp:Label>
                                                                        </td>
                                                                        <td align="right">
                                                                            <table border="0" cellpadding="0" cellspacing="0">
                                                                                <tr>
                                                                                    <td align="left" style="font-family: Tahoma,Arial,Helvetica,sans-serif; font-size: 12px;
                                                                                        height: 14px;">
                                                                                        Mã đơn hàng</td>
                                                                                    <td align="left" valign="middle" style="font-family: Tahoma,Arial,Helvetica,sans-serif;
                                                                                        font-size: 12px; white-space: nowrap; height: 14px;">
                                                                                        :
                                                                                        <asp:Label ID="lblMaDH" runat="server" Text="" Font-Bold="true" Font-Names="Tahoma"
                                                                                            Font-Size="12px"></asp:Label></td>
                                                                                </tr>
                                                                            </table>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td align="left" style="padding-left: 4px">
                                                                <asp:Label ID="Label18" runat="server" Text="MST: 0309543650" Style="font-family: Tahoma,Arial,Helvetica,sans-serif;
                                                                    font-size: 12px;"></asp:Label></td>
                                                        </tr>
                                                        <tr>
                                                            <td align="left" style="padding-left: 4px">
                                                                <asp:Label ID="Label12" runat="server" Text="16/83 Nguyễn Thiện Thuật P2 Q3" Style="font-family: Tahoma,Arial,Helvetica,sans-serif;
                                                                    font-size: 12px;"></asp:Label></td>
                                                        </tr>
                                                        <tr>
                                                            <td align="left" style="padding-left: 4px">
                                                                <asp:Label ID="Label16" runat="server" Text="Tel:(08)62909078-62909079 Cel:098.2600917"
                                                                    Style="font-family: Tahoma,Arial,Helvetica,sans-serif; font-size: 12px;"></asp:Label></td>
                                                        </tr>
                                                        <tr>
                                                            <td align="left" style="padding-left: 4px">
                                                                <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                                                                    <tr>
                                                                        <td>
                                                                            <asp:Label ID="Label17" runat="server" Text="www.hoangnguyenbao.com" Style="font-family: Tahoma,Arial,Helvetica,sans-serif;
                                                                                font-size: 12px;"></asp:Label>
                                                                        </td>
                                                                        <td align="right">
                                                                            <asp:Label ID="lblUSD" runat="server" Font-Names="Tahoma" Font-Size="12px" Visible="False"></asp:Label>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="4" align="center" valign="top" style="height: 23px">
                                                    <asp:Label ID="Label2" runat="server" Text="HÓA ĐƠN BÁN HÀNG" Font-Bold="True" Font-Size="13pt"
                                                        Font-Names="Tahoma"></asp:Label></td>
                                            </tr>
                                            <tr>
                                                <td align="right" colspan="4" valign="bottom">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="4">
                                                    <table id="AutoNumber1" style="border-right: 1px solid; padding-right: 0px; border-top: 1px solid;
                                                        padding-left: 0px; padding-bottom: 0px; border-left: 1px solid; padding-top: 1px;
                                                        border-bottom: 1px solid; border-collapse: collapse" bordercolor="#111111" cellspacing="0"
                                                        cellpadding="2" width="100%">
                                                        <tr>
                                                            <td nowrap style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                border-bottom: 1px dotted; width: 95px; font-family: Tahoma,Arial,Helvetica,sans-serif;
                                                                font-size: 12px;" align="left">
                                                                Tên khách hàng</td>
                                                            <td align="left" colspan="3" nowrap="nowrap" style="padding-right: 4px; padding-left: 4px;
                                                                padding-bottom: 1px; padding-top: 1px; border-bottom: 1px dotted; font-family: Tahoma,Arial,Helvetica,sans-serif;
                                                                font-size: 12px;">
                                                                :&nbsp;<asp:Label ID="lblTenKH" runat="server" Text=""></asp:Label></td>
                                                        </tr>
                                                        <tr>
                                                            <td nowrap style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                border-bottom: 1px dotted; width: 95px; font-family: Tahoma,Arial,Helvetica,sans-serif;
                                                                font-size: 12px;" align="left">
                                                                Địa chỉ</td>
                                                            <td nowrap style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                border-bottom: 1px dotted; font-family: Tahoma,Arial,Helvetica,sans-serif; font-size: 12px;"
                                                                align="left">
                                                                :&nbsp;<asp:Label ID="lblDiaChi" runat="server" Text=""></asp:Label></td>
                                                            <td nowrap style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                border-bottom: 1px dotted; width: 114px; font-family: Tahoma,Arial,Helvetica,sans-serif;
                                                                font-size: 12px;" align="left">
                                                                Tỉnh, Thành Phố</td>
                                                            <td nowrap style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                border-bottom: 1px dotted; font-family: Tahoma,Arial,Helvetica,sans-serif; font-size: 12px;"
                                                                align="left">
                                                                :&nbsp;<asp:Label ID="lblNoichon" runat="server" Text=""></asp:Label></td>
                                                        </tr>
                                                        <tr id="trTaxNo" runat="server">
                                                            <td nowrap style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                border-bottom: 1px dotted; width: 95px; font-family: Tahoma,Arial,Helvetica,sans-serif;
                                                                font-size: 12px;" align="left">
                                                                Mã số thuế</td>
                                                            <td nowrap style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                border-bottom: 1px dotted; font-family: Tahoma,Arial,Helvetica,sans-serif; font-size: 12px;"
                                                                colspan="3" align="left">
                                                                :&nbsp;<asp:Label ID="lblTaxNo" runat="server"></asp:Label></td>
                                                        </tr>
                                                        <tr>
                                                            <td nowrap style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                border-bottom: 1px dotted; width: 95px; font-family: Tahoma,Arial,Helvetica,sans-serif;
                                                                font-size: 12px;" align="left">
                                                                Điện thoại</td>
                                                            <td nowrap style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                border-bottom: 1px dotted; font-family: Tahoma,Arial,Helvetica,sans-serif; font-size: 12px;"
                                                                align="left">
                                                                :&nbsp;<asp:Label ID="lblSDT" runat="server" Text=""></asp:Label></td>
                                                            <td nowrap style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                border-bottom: 1px dotted; font-family: Tahoma,Arial,Helvetica,sans-serif; font-size: 12px;
                                                                width: 114px;" align="left">
                                                                Email</td>
                                                            <td nowrap style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                border-bottom: 1px dotted; font-family: Tahoma,Arial,Helvetica,sans-serif; font-size: 12px;"
                                                                align="left">
                                                                :&nbsp;<asp:Label ID="lblEmail" runat="server" Text=""></asp:Label></td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" colspan="4">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="4" valign="middle">
                                                    <asp:GridView ID="grvMaster" runat="server" GridLines="Both" BorderStyle="Solid"
                                                        AutoGenerateColumns="False" Width="100%" BorderWidth="1px" BorderColor="#407db3"
                                                        OnRowDataBound="grvMaster_RowDataBound" CellPadding="2" CellSpacing="0">
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="STT">
                                                                <ItemTemplate>
                                                                    <%#Container.DataItemIndex + 1%>
                                                                </ItemTemplate>
                                                                <ItemStyle CssClass="cssBorderGrv" BorderWidth="1px" HorizontalAlign="Center" BorderStyle="Solid"
                                                                    BorderColor="#407DB3" Width="2%" />
                                                                <HeaderStyle CssClass="cssBorderGrv" BorderWidth="1px" BorderStyle="Solid" BorderColor="#407DB3" />
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="FilmNo" HeaderText="Mã phim">
                                                                <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="center" BorderWidth="1px" BorderStyle="Solid"
                                                                    BorderColor="#407DB3" />
                                                                <HeaderStyle CssClass="cssBorderGrv" BorderWidth="1px" BorderStyle="Solid" BorderColor="#407DB3"
                                                                    Width="5%" Wrap="False" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="FilmEng" HeaderText="Tên phim">
                                                                <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Left" BorderWidth="1px" BorderStyle="Solid"
                                                                    BorderColor="#407DB3" />
                                                                <HeaderStyle CssClass="cssBorderGrv" BorderWidth="1px" BorderStyle="Solid" BorderColor="#407DB3"
                                                                    Width="35%" Wrap="False" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="Capacity" HeaderText="Dung lượng (GB)">
                                                                <ItemStyle HorizontalAlign="Center" CssClass="cssBorderGrv" BorderWidth="1px" BorderStyle="Solid"
                                                                    BorderColor="#407DB3" />
                                                                <HeaderStyle CssClass="cssBorderGrv" BorderWidth="1px" BorderStyle="Solid" BorderColor="#407DB3"
                                                                    Width="4%" Wrap="False" />
                                                            </asp:BoundField> 
                                                        </Columns>
                                                        <HeaderStyle Height="30px" Wrap="False" BorderWidth="1px" BorderStyle="Solid" BorderColor="#407DB3"
                                                            BackColor="#F7F8F9" ForeColor="Black" Font-Bold="True" Font-Names="Tahoma" Font-Size="12px" />
                                                        <RowStyle BorderWidth="1px" BorderStyle="Solid" BorderColor="#407DB3" Font-Names="Tahoma"
                                                            Font-Size="12px" />
                                                        <FooterStyle Height="22px" Wrap="False" BorderWidth="1px" BorderStyle="Solid" BorderColor="#407DB3"
                                                            BackColor="#edf5f9" ForeColor="Black" Font-Bold="True" HorizontalAlign="Right"
                                                            Font-Names="Tahoma" Font-Size="12px" />
                                                        <AlternatingRowStyle BackColor="Snow" Font-Names="Tahoma" Font-Size="12px" />
                                                    </asp:GridView>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="4" valign="middle">
                                                    <asp:Label ID="Label4" runat="server" Text="* Quý khách lưu ý:  hàng mua rồi không đổi, trả lại"
                                                        Font-Bold="True" Font-Names="Verdana" Font-Size="11px" Font-Italic="True"></asp:Label></td>
                                            </tr>
                                            <tr>
                                                <td align="center" colspan="4" rowspan="2">
                                                    <table border="0" bordercolor="#407db3" cellpadding="0" cellspacing="0" style="border-collapse: collapse">
                                                        <tr>
                                                            <td align="left" style="padding-right: 10px; white-space: nowrap; font-weight: bold;
                                                                font-size: 12px; font-family: Tahoma; height: 16px;" valign="bottom">
                                                                <asp:Label ID="Label14" runat="server" Font-Bold="True" Text="Tổng số lượng"></asp:Label></td>
                                                            <td align="right" style="white-space: nowrap; font-weight: bold; font-size: 11px;
                                                                font-family: Tahoma; height: 16px;" valign="bottom">
                                                                :&nbsp;
                                                            </td>
                                                            <td align="right" colspan="2" style="width: 160px; border-bottom: black thin dotted;
                                                                white-space: nowrap; height: 16px;" valign="bottom">
                                                                <asp:Label ID="lblQuantity" runat="server" Font-Names="Tahoma" Font-Size="12px"></asp:Label></td>
                                                            <td align="right" style="width: 5%; white-space: nowrap; height: 16px;">
                                                            </td>
                                                            <td id="td1" runat="server" align="left" style="padding-right: 10px; white-space: nowrap;
                                                                font-weight: bold; font-size: 12px; font-family: Tahoma; height: 16px;" valign="bottom">
                                                                <asp:Label ID="Label7" runat="server" Font-Bold="True" Text="Tổng dung lượng"></asp:Label></td>
                                                            <td runat="server" align="right" style="white-space: nowrap; font-weight: bold; font-size: 11px;
                                                                font-family: Tahoma; height: 16px;" valign="bottom" id="td5">
                                                                :&nbsp;
                                                            </td>
                                                            <td id="td2" runat="server" align="right" style="width: 160px; border-bottom: black thin dotted;
                                                                white-space: nowrap; height: 16px;" valign="bottom">
                                                                <asp:Label ID="lblTotal" runat="server" Font-Names="Tahoma" Font-Size="12px"></asp:Label>
                                                                <asp:Label ID="Label9" runat="server" Text="GB" Font-Names="Tahoma" Font-Size="12px"></asp:Label>&nbsp;
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                            </tr>
                                            <tr>
                                                <td align="left" colspan="4">
                                                    <table border="0" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td style="border-bottom: black thin dotted">
                                                                <asp:Label ID="lblChuY" runat="server" Font-Bold="True" Text="Ghi chú: " Visible="False"
                                                                    Font-Names="Tahoma" Font-Size="12px"></asp:Label>
                                                                <asp:Label ID="lblNote" runat="server" Font-Names="Tahoma" Font-Size="12px"></asp:Label></td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center" colspan="4" rowspan="1">
                                                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                                                        <tr>
                                                            <td>
                                                            </td>
                                                            <td align="right" colspan="3">
                                                                <asp:Label ID="lblDate" runat="server" Text="Ngày&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tháng&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; năm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
                                                                    Font-Size="10pt" Font-Names="Tahoma"></asp:Label>
                                                                &nbsp; &nbsp; &nbsp;&nbsp;
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td align="center" style="font-weight: bold; font-size: 12px; font-family: Tahoma;">
                                                                NV Bán hàng</td>
                                                            <td align="center" style="font-weight: bold; font-size: 12px; font-family: Tahoma;">
                                                                Thủ quỹ</td>
                                                            <td align="center" colspan="2" rowspan="1" style="font-weight: bold; font-size: 12px;
                                                                font-family: Tahoma;">
                                                                Khách hàng</td>
                                                        </tr>
                                                        <tr>
                                                            <td align="center">
                                                                <asp:Panel ID="pnlSign" runat="server">
                                                                </asp:Panel>
                                                            </td>
                                                            <td align="center">
                                                                <br />
                                                                <br />
                                                                <br />
                                                                <br />
                                                            </td>
                                                            <td align="center" colspan="2" rowspan="1">
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td style="height: 14px" align="center">
                                                                <table border="0" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td align="center">
                                                                            <asp:Label ID="lblSignNm" runat="server" Font-Bold="True" Font-Names="Tahoma" Font-Size="12px"></asp:Label></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="center">
                                                                            <div style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                                border-top: 1px dotted; width: 150px;" align="left">
                                                                            </div>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                            <td style="height: 14px" align="center">
                                                                <table border="0" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td align="center">
                                                                            <asp:Label ID="Label1" runat="server" Font-Bold="true" Text="&nbsp;"></asp:Label></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="center">
                                                                            <div style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                                border-top: 1px dotted; width: 150px;" align="left">
                                                                            </div>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                            <td align="center" colspan="2" rowspan="1" style="height: 14px">
                                                                <table border="0" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td align="center">
                                                                            <asp:Label ID="Label3" runat="server" Font-Bold="true" Text="&nbsp;"></asp:Label></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="center">
                                                                            <div style="padding-right: 4px; padding-left: 4px; padding-bottom: 2px; padding-top: 2px;
                                                                                border-top: 1px dotted; width: 150px;" align="left">
                                                                            </div>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </form>

    <script language="javascript" type="text/javascript">
     try
     {
          document.body.scrollLeft=1000;
          document.documentElement.scrollLeft=1000;
     }
     catch(e){}
    /*
    document.onkeydown=function()
    { 
        var isCtrl;
        var sState='<%=Request["sState"]%>';
        if(sState!='E' || sState!='Y')
        {
            if(IsIE())
            {
                    intKey = window.event.keyCode;
                    if(intKey == 17)
                    {
                        isCtrl=true;
                    }
                    
                    if(intKey == 80 && isCtrl == true) // Ctrl + P
                    {
                         alert('Đơn đặt hàng này cần duyệt trước khi in hóa đơn này');        
                         return false;
                    }
                 
                 
            }
            return false;
         } 
    }
   */
    /*document.onkeydown=function(e)
    {     
        var intKey;    

        if ( IsIE() ){
            intKey = window.event.keyCode;
         
        }
        else{
            intKey = e.keyCode;         
        }       
        
        if(intKey == 17)
        {
            isCtrl=true;
        }
        var sState='<%=Request["sState"]%>';
        if(intKey == 80 && isCtrl == true && sState!='Y') // Ctrl + P
        {
            alert('Đơn đặt hàng này cần duyệt trước khi in'); //          
           window.close();
        }
    } */   
    function IsIE()
    {
       
        if (navigator.appName.toLowerCase()=="netscape")
            return false;
       else
            return true;
    }

   // document.oncontextmenu=new Function("return false");   
    
    
    function printPage()
    {
           document.body.scrollLeft=1000;
          document.documentElement.scrollLeft=1000;
       var width=screen.availWidth-30;
        var height=screen.availHeight-20;
         var left = parseInt((screen.availWidth/2) - (width/2));
		var top = parseInt((screen.availHeight/2) - (height/2));
          
         var prtContent = document.getElementById("printBody");
         var WinPrint = window.open('','',"menu=0,scrollbars=1,status=1,location=0,resizable=1,fullscreen=1");
         WinPrint.document.write(prtContent.innerHTML);
         WinPrint.document.close();
         WinPrint.focus();
         WinPrint.print();
         WinPrint.close();
        // var oldstr = document.body.innerHTML;
       //  prtContent.innerHTML=strOldOne; 
          
          
          /*var printBody=document.getElementById("printBody");
          var headstr = "<html><head><title></title></head><body>";
          var footstr = "</body></html>";
          var newstr = printBody.outerHTML;
          var oldstr = document.body.innerHTML;
          document.body.innerHTML = headstr+newstr+footstr;
          window.print();
          document.body.innerHTML = oldstr;   
          return false;*/
    }
    
     function codeNum(e)
     {
        
             e = event.which;
       
         if(e.keyCode)
             alert(e.keyCode);
         else
             alert(e.charCode);
     }

    

    
    </script>

</body>
</html>
